1 /*
2 * Copyright 2005 Arnaud Prost
3 *
4 * Arnaud.prost@gmail.com
5 *
6 * This software is a computer program whose purpose is to ease the
7 * management of software project.
8 *
9 * This software is governed by the CeCILL license under French law and
10 * abiding by the rules of distribution of free software. You can use,
11 * modify and/ or redistribute the software under the terms of the CeCILL
12 * license as circulated by CEA, CNRS and INRIA at the following URL
13 * "http://www.cecill.info".
14 *
15 * As a counterpart to the access to the source code and rights to copy,
16 * modify and redistribute granted by the license, users are provided only
17 * with a limited warranty and the software's author, the holder of the
18 * economic rights, and the successive licensors have only limited
19 * liability.
20 *
21 * In this respect, the user's attention is drawn to the risks associated
22 * with loading, using, modifying and/or developing or reproducing the
23 * software by the user in light of its specific status of free software,
24 * that may mean that it is complicated to manipulate, and that also
25 * therefore means that it is reserved for developers and experienced
26 * professionals having in-depth computer knowledge. Users are therefore
27 * encouraged to load and test the software's suitability as regards their
28 * requirements in conditions enabling the security of their systems and/or
29 * data to be ensured and, more generally, to use and operate it in the
30 * same conditions as regards security.
31 *
32 * The fact that you are presently reading this means that you have had
33 * knowledge of the CeCILL license and that you accept its terms.
34 */
35 package net.sf.pmr.agilePlanning.service;
36
37 import java.util.Date;
38 import java.util.Set;
39
40 import net.sf.pmr.agilePlanning.domain.release.Release;
41 import net.sf.pmr.keopsframework.domain.validation.Errors;
42
43 /***
44 * @author Arnaud Prost (arnaud.prost@gmail.com)
45 */
46 public interface ReleaseService {
47
48 /***
49 * find releases for a projet (using his persistanceId)
50 * @param projectPersistanceId projectPersistanceId
51 * @return Iteration
52 */
53 Set findByProjectPersistanceId(final int projectPersistanceId);
54
55 /***
56 * find a release by its persistance Id
57 * @param persistanceId persistanceId
58 * @return Release
59 */
60 Release findByPersistanceId(final int persistanceId);
61
62 /***
63 * Add a release
64 * @param projectPersistanceId id of the agileProject
65 * @param number of the release
66 * @param date of the release
67 * @return errors errors
68 */
69 Errors add(final int projectPersistanceId, final String number, final Date date);
70
71 /***
72 * Update a release
73 * @param projectPersistanceId id of the agileProject
74 * @param number of the release
75 * @param date of the release
76 * @param persistanceId of the release
77 * @param persistanceVersion persistance version
78 * @return errors errors
79 */
80 Errors update(final int projectPersistanceId, final String number, final Date date, final int persistanceId, final long persistanceVersion);
81
82 // /***
83 // * Delete a release
84 // * @param agileProjectPersistanceId id of the agileProject
85 // * @param persistanceId of the release
86 // * @param persistanceVersion persistance version
87 // * @return errors errors
88 // */
89 // Errors delete(final int persistanceId, final long persistanceVersion);
90
91 }